<?php

/**
 * Object used to manage customers and their information
 * 
 * @package Customer
 * @author Guillem Mateos
 * @version 0.1
 * @abstract 
 * @copyright GRITO2003, S.L.
 */

/**
 * includes
 */
//include_once( '../library/config.php' );
include_once( FROG_DATABASE.'DBObject.class.php' );

class User extends DBObject
{
  /**
  * Initialize vars
  */
  public function initVars( )
  {
    $this->dbfields['id_user'] = null;
    $this->dbfields['email'] = null;
    $this->dbfields['id_account'] = null;
    
    $this->dbparams['table'][0] = 'user';
    $this->dbparams['main_id'] = 'id_user';
  }
  
  public static function findByIdUser( $idu )
  {   
    if( !$idu )
      return false;
      
    $u = new User();
        
    $w_expr_01 = new Expression( 'id_user', '=', $idu );

    $result = $u->select( '', $w_expr_01  );
    
    return $result;
  }
} 

?>